using System;
using System.Collections.Generic;
using System.Text;
using CodePlex.Resourceful;

namespace CodePlex.Resourceful.Amazon.S3
{
    public class ListBucketResult
    {
        private readonly ReadOnlyList<Key, string> _keys;
        private readonly ReadOnlyList<string> _commonPrefixes;

        public ListBucketResult(IEnumerable<Key> keys, IEnumerable<string> commonPrefixes)
        {
            _keys = new ReadOnlyList<Key,string>(keys, delegate(Key item)
            {
                return item.Name;
            });

            _commonPrefixes = new ReadOnlyList<string>(commonPrefixes);
        }
        public ReadOnlyList<Key,string> Keys { get { return _keys; } }
        public ReadOnlyList<string> CommonPrefixes { get { return _commonPrefixes; } }

    }
}
